package com.service.bean.alarm;

import java.util.Date;

import com.service.tools.DateFormat;

public class AlarmInfo {
	/**
	 * gps信号id
	 */
	public String signalId;
	/**
	 * 设备号
	 */
	public String gpsNo;
	/**
	 * 车辆id
	 */
	public String equipmentId;
	/**
	 * 报警时间
	 */
	public Date alarmTime;
	/**
	 * 报警地点
	 */
	public String alarmLocation;
	/**
	 * 报警类型
	 */
	public String alarmType;
	/**
	 * 报警类别
	 */
	public String alarmSubType;
	/**
	 * 单位
	 */
	public String companyCode;
	/**
	 * 报警级别
	 */
	public String alarmLevel;
	/**
	 * 报警内容
	 */
	public String alarmMessage;
	/**
	 * 区域
	 */
	public String areaId;
	/**
	 * 不知道
	 */
	public String refId;
	/**
	 * 持续时间
	 */
	public long keepTime;
	/**
	 * 添加时间
	 */
	public Date addTime;
	
	public Object[] getAll() {
		Object[] arrs = new Object[14];
		arrs[0] = signalId == null ? signalId : "'" + signalId + "'";
		arrs[1] = "'" + gpsNo + "'";
		arrs[2] = "'" + equipmentId + "'";
		arrs[3] = "'" + DateFormat.format(alarmTime) + "'";
		arrs[4] = alarmLocation == null ? alarmLocation : "'" + alarmLocation + "'";
		arrs[5] = alarmType == null ? alarmType : "'" + alarmType + "'";
		arrs[6] = alarmSubType == null ? alarmSubType : "'" + alarmSubType + "'";
		arrs[7] = "'" + companyCode + "'";
		arrs[8] = alarmLevel == null ? alarmLevel : "'" + alarmLevel + "'";
		arrs[9] = alarmMessage == null ? alarmMessage : "'" + alarmMessage + "'";
		arrs[10] = areaId == null ? areaId : "'" + areaId + "'"; 
		arrs[11] = refId == null ? refId : "'" + refId + "'";
		arrs[12] = "'" + keepTime + "'";
		arrs[13] = "'" + DateFormat.format(addTime) + "'";
		return arrs;
	}
	
}
